package task1;

import java.util.Scanner;

public class test2 {

    static Scanner input=new Scanner(System.in);

    public static void main(String[] args) {

        long max=0;//4
        long count=1;//1
        long flag=0;
        long next;

        while (true){
            next=input.nextInt();
            if(next==0){
                max=Math.max(count,max);
                break;
            }
            if(flag==next){
                count++;
            }else
            {
                if(count>max) {
                    max=count;
                    count=1;
                }
                flag=next;
            }
        }
        System.out.println(max);
    }
}
